package com.xiaobaibai.controller;

import com.alibaba.fastjson.JSONObject;
import com.xiaobaibai.response.ResponseFormat;
import com.xiaobaibai.service.IUserAdminService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@Api(tags = "权限验证相关接口")
@RequestMapping("/user")
@Slf4j
@CrossOrigin
public class AdminUserController {

    @GetMapping("/getUserInfo")
    public ResponseFormat getUserInfo(){

        JSONObject jsonObject=new JSONObject();
        jsonObject.put("name","小白白");
        jsonObject.put("roles","admin");
        jsonObject.put("avatar","http://image.xiaobaibai.ink/admin.png");
        jsonObject.put("introduction","管理员大大");

        return ResponseFormat.ok("获取用户信息成功",jsonObject);
    }

}